package com.movitech.mobile.cz.base.supplier.bizservice;

import com.movitech.mobile.cz.base.modules.controller.RestReturnResult;
import com.movitech.mobile.cz.base.supplier.bizvo.*;
import com.movitech.mobile.cz.base.supplier.entity.SSuppliersInspectionPerform;
import com.movitech.mobile.cz.base.supplier.entity.SSuppliersLastThreeAchieve;
import com.movitech.mobile.cz.base.supplier.entity.ext.TransferRequestVO;

import java.util.List;

/**
 * <p>
 * 供方管理流程 服务
 * </p>
 * @author Jack.Gong
 * @since 2018-03-01
 *
 */
public interface SSuppliersWorkFlowService {
	
	/**
	 * 更新供方状态,不走MBS审批流
	 * @param suppliersAuditRequestVO
	 * @return
	 */
	public boolean updateSupplierStatusNonMBS(SuppliersAuditRequestVO suppliersAuditRequestVO);
	
	/**
	 * 根据供方id,获取供放基本信息
	 * @param id
	 * @return
	 */
	public SuppliersSiteInspectionResponseVO getSuppliersInspectionBaseDetails(String id);

	/**
	 * 供方资质审查流程
	 * @param suppliersAuditRequestVO
	 * @return
	 */
	public RestReturnResult<Object> qualificationInspection(SuppliersAuditRequestVO suppliersAuditRequestVO) throws RuntimeException;

	/**
	 * 供方管理-现场考察-录入
	 * @param suppliersInspectionRequestVO
	 * @return
	 */
	public RestReturnResult<Object> doSuppliersInspection(SuppliersInspectionRequestVO suppliersInspectionRequestVO) throws RuntimeException;

	/**
	 * 供应商现场考察-供方基本信息获取
	 * @param supplierId
	 * @param rcRelatedId
	 * @param templateType
	 * @return
	 */
	public SuppliersBaseInfoResponseVO getSuppliersBaseInfo(String supplierId, String rcRelatedId, Integer templateType);

	/**
	 * 供方管理-现场考察-组长打分
	 * @param suppliersInspectionRequestVO
	 */
	public RestReturnResult<Object> doSuppliersInspectionLeaderAudit(SuppliersInspectionRequestVO suppliersInspectionRequestVO) throws RuntimeException;

	/**
	 * 供应商现场考察-基本信息获取
	 * @param supplierId
	 * @param rcRelatedId 
	 * @return
	 */
	public SuppliersSiteInspectionBaseInfoVO getSuppliersSiteInspectionBaseInfo(String supplierId, String rcRelatedId, Integer templateType);
	
	/**
	 * 供应商现场考察-考察报告信息获取（未处理状态）
	 * @return
	 */
	public InspectionBaseInfoResponseVO getInspectionBaseInfo(String supplierId, String rcRelatedId);
	
	/**
	 * 供应商现场考察-组员意见信息获取
	 * @return
	 */
	public List<TeamMembersOpinionVO> getTeamMembersOpinionInfo(String suppliersInspectionId);

	/**
	 * 供应商现场考察-组长打分待办-打分明细
	 * @param suppliersInspectionScoreRequestVO
	 * @return
	 */
	public List<SuppliersInspectionScoreResponseVO> getSuppliersInspectionScoreDetails(
			SuppliersInspectionScoreRequestVO suppliersInspectionScoreRequestVO);

	/**
	 * 供方管理-现场考察-组员会签
	 * @param suppliersInspectionRequestVO
	 */
	public RestReturnResult<Object> doSuppliersInspectionMemberAudit(SuppliersInspectionRequestVO suppliersInspectionRequestVO) throws RuntimeException;

	/**
	 * 供方管理-现场考察审核
	 * @param suppliersAuditRequestVO
	 */
	public RestReturnResult<Object> checkSuppliersInspection(SuppliersAuditRequestVO suppliersAuditRequestVO) throws RuntimeException;

	/**
	 * 发起供应商入库审批
	 * @param suppliersAuditRequestVO
	 */
	public RestReturnResult<Object> setupSupplierStorageProcess(SuppliersAuditRequestVO suppliersAuditRequestVO) throws RuntimeException;

	/**
	 * 供应商入库审批处理（通过/不通过）
	 * @param suppliersAuditRequestVO
	 */
	public void doSupplierStorageProcess(SuppliersAuditRequestVO suppliersAuditRequestVO);
	
	/***
	 * 采购管理后台首页-待办详情
	 * @param myDealId
	 * @return
	 */
	public RestReturnResult<Object> doToDoItem(String myDealId);

	/**
	 * 供方引入
	 * @param supplierId
	 */
	public RestReturnResult<Object> supplierImport(String supplierId,String regionalCompanyId) throws RuntimeException;

	/**
	 * 供方变更审核
	 * @param suppliersAuditRequestVO
	 */
	public RestReturnResult<Object> supplierAlterationAudit(SuppliersAuditRequestVO suppliersAuditRequestVO) throws RuntimeException;

	/**
	 * 转待观察
	 * @param
	 */
	public RestReturnResult<Object> turnToPendingWatch(TransferRequestVO transferRequestVO) throws RuntimeException;

	/**
	 * 转不合格
	 * @param
	 */
	public RestReturnResult<Object> turnToUnqualified(TransferRequestVO transferRequestVO) throws RuntimeException;

	/**
	 * 转潜在
	 * @param
	 */
	public RestReturnResult<Object> turnToPotential(TransferRequestVO transferRequestVO) throws RuntimeException;

	/**
	 * 转黑库
	 * @param
	 */
	public RestReturnResult<Object> turnToBlackLibrary(TransferRequestVO transferRequestVO) throws RuntimeException;

	/**
	 * 重新考察
	 * @param rcRelatedId
	 * @return
	 * @throws RuntimeException
	 */
	public RestReturnResult<Object> reDoInspection(String rcRelatedId) throws RuntimeException;

	/**
	 * 合格列表现场考察发起控制
	 * @param checkDoSiteInspectionRequestVO
	 * @return
	 * @throws RuntimeException
	 */
	public RestReturnResult checkDoSiteInspectionInQualificationList(
			CheckDoSiteInspectionRequestVO checkDoSiteInspectionRequestVO) throws RuntimeException;

	/**
	 * 审核现场考察申请
	 * @param suppliersInspectionRequestVO
	 * @return
	 */
	public RestReturnResult checkSuppliersInspectionApply(SuppliersInspectionRequestVO suppliersInspectionRequestVO);

    String addSuppliersInspection(SuppliersInspectionRequestVO suppliersInspectionRequestVO);

    void deleteSupplierInspectionById(String id);

	void updateSupplierInspectionAttach(SuppliersInspectionRequestVO suppliersInspectionRequestVO);

	List<SSuppliersLastThreeAchieve> getOutContactSimList(String name,String supplierId);

	void addSuppliersInspectionPerform(SSuppliersInspectionPerform sSuppliersInspectionPerform);

	void deleteSupplierInspectionPerformById(String id);

	SuppliersInspectionDetailVO selectSupplierInspectionDetail(String id);

	void submitSupplierInspectionDetail(SuppliersInspectionDetailVO vo);

    boolean isCompleteReport(String inspectId);

	List<TeamMembersOpinionVO>  getTeamMembersOpinionInfos(String rcRelatedId);
}
